<template>
    <view class="pages-feedback-list">
        <x-list ref="xlist" @load="load">
            <template #item="{ item, index, total }">
                <MessageItem :item="item" :index="index" :total="total" />
            </template>
        </x-list>
    </view>
</template>

<script>
    import dataList from '@/data/list.json'
    import MessageItem from '../components/message-item.vue'
    export default {
        components: {
            MessageItem,
        },
        data() {
            return {
            }
        },
        onLoad() {
            uni.setNavigationBarTitle({
                title: '我的咨询'
            });
        },
        methods: {
            load({ page, pageSize }) {
                this.$refs.xlist.success(dataList.data)
                // this.$refs.xlist.fail()
            },
        }
    }
</script>

<style lang="scss" scoped>
    .pages-feedback-list {
        background-color: #f8f8f8;
    }
</style>
